package com.jic.interaction.ChinaPost.controller;

import com.jic.common.base.vo.RestResult;
import com.jic.interaction.ChinaPost.model.vo.request.OrderInfoRequest;
import com.jic.interaction.ChinaPost.model.vo.request.OrderLogisticsInfoRequest;
import com.jic.interaction.ChinaPost.service.OrderInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

@RestController
@SuppressWarnings("订单信息同步")
@RequestMapping("/orderInfo/")
public class OrderInfoController {

    @Resource
    private OrderInfoService orderInfoService;

    @PostMapping("orderInfo")
    @ApiOperation(value="同步订单信息")
    @ResponseBody
    private RestResult<?>  orderInfo(@RequestBody OrderInfoRequest orderInfoRequest) throws Exception {
        return orderInfoService.orderInfosync(orderInfoRequest);
    }

    @PostMapping("logisticsSync")
    @ApiOperation(value="同步订单物流信息")
    @ResponseBody
    private RestResult<?>  logisticsSync(@RequestBody OrderLogisticsInfoRequest orderLogisticsInfoRequest) throws Exception {
        return orderInfoService.logisticsSync(orderLogisticsInfoRequest);
    }
}
